package org.csu.jpetstore_cms.service.impl;


import org.csu.jpetstore_cms.mapper.AccountMapper;
import org.csu.jpetstore_cms.pojo.Account;
import org.csu.jpetstore_cms.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public List<Account> findAll() {
        return accountMapper.findAll();
    }

    @Override
    public Account findByID(String id) {
        return accountMapper.findByID(id);
    }


    @Override
    public void updateAccountInfo(Account account) {
        accountMapper.updateAccountInfo(account);
    }

    @Override
    public void insertAccount(Account account) {
         accountMapper.insertAccount(account);
    }

    @Override
    public List<Account> findByPage(Integer pageNum, Integer pageSize) {
        return accountMapper.findByPage(pageNum,pageSize);
    }
}
